<?php
defined('_JEXEC') or die ('Restricted access');
define('P2G_COM','com_picasa2gallery');

/**
 * Installer function
 * @return
 */
function com_install() {
    global $mainframe;
    $db = & JFactory::getDBO();

	// Check is cURL extention is loaded
	if  (!in_array  ('curl', get_loaded_extensions())) {
		// no possibility to use translation since new language file not installed yet!!!
		echo '<div style="color: red;">Sorry, picasa2gallery requires cURL library.<br />This extention is not loaded on your server.<br /><b>Please contact your administrator</b>.</div>';
	}

    jimport('joomla.filesystem.folder');
    jimport('joomla.filesystem.file');

    $path = JPATH_ADMINISTRATOR.DS.'components'.DS.P2G_COM;

    jimport('joomla.installer.installer');
    $installer = & JInstaller::getInstance();

    $source 	= $installer->getPath('source');

    $language = & JFactory::getLanguage();
    $language->load(P2G_COM, JPATH_ROOT);
    
    $installer->set('extension.message', $out);    
    
}

/**
 * Uninstall function
 * @return
 */
function com_uninstall() {
}

?>